/**
 * @Author: Bobby
 * @Date: 2022-02-15 13:14:17
 * @LastEditTime: 2022-03-01 10:18:40
 * @LastEditors: Bobby
 * @Description:
 * @FilePath: \wms-v2\src\ve\common\components\baseComs\form\uiSwitch.js
 * @CIMC-V2
 */
import { exInput, exSwitch, exTextarea, exCustomValue, exValidateSelect, exRadioGroup } from '@ve/common/components/extension'

export default {
  VERSION: '20220408',
  type: 'uiSwitch',
  name: '开关',
  icon: 'toggle-line',
  //数据别名
  // dataName: 'uiSwitch_data',
  //数据集合 表单 列表等等
  data: {
    requestData: {},
  },
  extension: {
    model: exInput('Model', 'switch_name'),
    label: exInput('标签', '开关'),
    //rule: exSwitch('验证', false),
    extendRule: exValidateSelect('', {}, []),
    // ...exDivider(0),
    width: { ...exInput('宽度', 'auto', '填写数字:单位px,auto:自动宽度'), isSuperior: true },
    labelWidth: { ...exInput('label宽度', 'auto', '填写数字:单位px,auto:自动宽度'), isSuperior: true },
    tooltip: { ...exTextarea('弹窗提示', '', '', 3), isSuperior: true },
    disabled: exSwitch('禁用', false),
    hidden: exSwitch('隐藏', false),
    modelStyle: {
      ...exRadioGroup('组件风格', 'capsule', [
        {
          value: 'capsule',
          label: '胶囊',
        },
        {
          value: 'rectangle',
          label: '矩形框',
        },
      ]),
      isSuperior: true,
    },
    activeValue: exCustomValue('打开值', 'Y'),
    inactiveValue: exCustomValue('关闭值', 'N'),
    defaultState: exSwitch('默认状态', false),
    enterSelect: {
      type: 'exModuleSelect',
      name: '回车选中',
      value: [],
      hasCheckbox: false,
      treeData: '$getPageModules',
      isSuperior: true,
    },
  },
  //交互
  interaction: [],
  //条件、逻辑指令
  logicInstruction: [],
}
